// insert html with whitespace:
var xtml = function(tg, str, replace, preserveWhitespace){
	if(typeof(tg) == "string") tg = docId(tg);
	if(typeof(tg) == "object"){
		if(preserveWhitespace == true){
			// preserve whitespace but still wrap text
			if(browser.isIE){
				tg.style.wordWrap = "break-word";
				tg.style.whiteSpace = "pre";
			} else tg.style.whiteSpace = "-moz-pre-wrap";
		}
		if(tg != null){
			if(replace == true) tg.innerHTML = str;
			else tg.innerHTML += str;
			return true;
		} else return false;
	} else return false;
};
